package com.wzy.ldap.ioc.xml;

public class AnimalFactory {

    public Animal getAnimal(String type) {
        if (type.equals("cat")) {
            return new Cat();
        } else {
            return new Dog();
        }

    }
}
